.class public Les/bm;
.super Ljava/lang/Object;
.source "ESFileImageList.java"

# interfaces
.implements Les/dm;


# instance fields
.field private a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/cm;",
            ">;"
        }
    .end annotation
.end field

.field private b:Lcom/estrongs/fs/f;

.field private c:Lcom/estrongs/android/pop/e;


# direct methods
.method public constructor <init>(Lcom/estrongs/fs/f;Ljava/lang/String;Ljava/lang/String;Lcom/estrongs/fs/h;Les/q70;Lcom/estrongs/android/pop/e;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Les/bm;->a:Ljava/util/List;

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/bm;->c:Lcom/estrongs/android/pop/e;

    .line 4
    iput-object p1, p0, Les/bm;->b:Lcom/estrongs/fs/f;

    .line 5
    iput-object p6, p0, Les/bm;->c:Lcom/estrongs/android/pop/e;

    .line 6
    invoke-direct {p0, p2, p3, p4, p5}, Les/bm;->a(Ljava/lang/String;Ljava/lang/String;Lcom/estrongs/fs/h;Les/q70;)V

    return-void
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;Lcom/estrongs/fs/h;Les/q70;)V
    .locals 7

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 1
    :try_start_0
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->A(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "/"

    .line 2
    invoke-virtual {v2, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 3
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "/"

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 4
    :cond_0
    invoke-static {p2}, Lcom/estrongs/android/util/h0;->A(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    const-string v3, "/"

    .line 5
    invoke-virtual {p2, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_1

    .line 6
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, "/"

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    :cond_1
    const/4 v3, 0x1

    if-nez p3, :cond_4

    .line 7
    invoke-static {v1}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object p2

    .line 8
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->U1(Ljava/lang/String;)Z

    move-result p3

    if-nez p3, :cond_2

    invoke-static {v2}, Lcom/estrongs/android/util/h0;->k2(Ljava/lang/String;)Z

    move-result p3

    if-eqz p3, :cond_3

    :cond_2
    const/4 v3, 0x0

    .line 9
    :cond_3
    invoke-virtual {p2, v2, v3}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;Z)Ljava/util/List;

    move-result-object p2

    :goto_0
    move-object v1, p2

    goto :goto_1

    .line 10
    :cond_4
    invoke-static {v1}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object v4

    new-instance v5, Lcom/estrongs/fs/m;

    sget-object v6, Lcom/estrongs/fs/l;->c:Lcom/estrongs/fs/l;

    invoke-direct {v5, v2, p2, v6, v1}, Lcom/estrongs/fs/m;-><init>(Ljava/lang/String;Ljava/lang/String;Lcom/estrongs/fs/l;Ljava/lang/String;)V

    .line 11
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->U1(Ljava/lang/String;)Z

    move-result p2

    if-nez p2, :cond_5

    invoke-static {v2}, Lcom/estrongs/android/util/h0;->k2(Ljava/lang/String;)Z

    move-result p2

    if-eqz p2, :cond_6

    :cond_5
    const/4 v3, 0x0

    .line 12
    :cond_6
    invoke-virtual {v4, v5, v3, p3}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;ZLcom/estrongs/fs/h;)Ljava/util/List;

    move-result-object p2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    nop

    :goto_1
    if-nez v1, :cond_7

    return-void

    .line 13
    :cond_7
    :try_start_1
    invoke-static {v1, p4}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_2

    :catch_1
    nop

    .line 14
    :goto_2
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result p2

    if-ge v0, p2, :cond_b

    .line 15
    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Lcom/estrongs/fs/g;

    if-nez p2, :cond_8

    goto :goto_3

    .line 16
    :cond_8
    invoke-interface {p2}, Lcom/estrongs/fs/g;->i()Lcom/estrongs/fs/l;

    move-result-object p3

    if-eqz p3, :cond_9

    .line 17
    invoke-virtual {p3}, Lcom/estrongs/fs/l;->b()Z

    move-result p3

    if-eqz p3, :cond_9

    goto :goto_3

    .line 18
    :cond_9
    invoke-interface {p2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p3

    .line 19
    invoke-static {p2}, Lcom/estrongs/android/util/n0;->c(Lcom/estrongs/fs/g;)Z

    move-result p4

    if-nez p4, :cond_a

    invoke-static {p3, p1}, Lcom/estrongs/android/util/h0;->i(Ljava/lang/String;Ljava/lang/String;)Z

    move-result p4

    if-nez p4, :cond_a

    goto :goto_3

    .line 20
    :cond_a
    new-instance p4, Les/am;

    iget-object v2, p0, Les/bm;->b:Lcom/estrongs/fs/f;

    invoke-direct {p4, p0, v2, p2}, Les/am;-><init>(Les/dm;Lcom/estrongs/fs/f;Lcom/estrongs/fs/g;)V

    .line 21
    invoke-static {p3}, Lcom/estrongs/android/pop/utils/r;->a(Ljava/lang/String;)I

    move-result p2

    invoke-virtual {p4, p2}, Les/am;->a(I)V

    .line 22
    iget-object p2, p0, Les/bm;->a:Ljava/util/List;

    monitor-enter p2

    .line 23
    :try_start_2
    iget-object p3, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 24
    monitor-exit p2

    :goto_3
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    :catchall_0
    move-exception p1

    monitor-exit p2
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw p1

    :cond_b
    return-void
.end method


# virtual methods
.method public a(Les/cm;)I
    .locals 1

    .line 25
    iget-object v0, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result p1

    return p1
.end method

.method public a(Landroid/net/Uri;)Les/cm;
    .locals 7

    .line 27
    invoke-virtual {p1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    .line 28
    invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v1

    const-string v2, "search"

    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 29
    invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v0

    .line 30
    :cond_0
    iget-object v1, p0, Les/bm;->a:Ljava/util/List;

    monitor-enter v1

    .line 31
    :try_start_0
    iget-object v2, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Les/cm;

    .line 32
    invoke-interface {v3}, Les/cm;->i()Ljava/lang/String;

    move-result-object v4

    const-string v5, "file"

    .line 33
    invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_2

    const-string v5, "file://"

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_2

    .line 34
    invoke-virtual {p1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_2
    const-string v5, "search"

    .line 35
    invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_3

    .line 36
    move-object v5, v3

    check-cast v5, Les/am;

    .line 37
    invoke-virtual {v5}, Les/am;->k()Lcom/estrongs/fs/g;

    move-result-object v6

    if-eqz v6, :cond_4

    .line 38
    invoke-virtual {v5}, Les/am;->k()Lcom/estrongs/fs/g;

    move-result-object v4

    invoke-interface {v4}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object v4

    goto :goto_0

    .line 39
    :cond_3
    invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v0

    .line 40
    :cond_4
    :goto_0
    invoke-static {v4, v0}, Lcom/estrongs/android/util/h0;->i(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 41
    monitor-exit v1

    return-object v3

    .line 42
    :cond_5
    monitor-exit v1

    const/4 p1, 0x0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method

.method public a(I)Z
    .locals 0

    .line 26
    invoke-virtual {p0, p1}, Les/bm;->b(I)Les/cm;

    move-result-object p1

    invoke-virtual {p0, p1}, Les/bm;->b(Les/cm;)Z

    move-result p1

    return p1
.end method

.method public b(I)Les/cm;
    .locals 2

    .line 1
    iget-object v0, p0, Les/bm;->a:Ljava/util/List;

    monitor-enter v0

    if-ltz p1, :cond_0

    .line 2
    :try_start_0
    iget-object v1, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge p1, v1, :cond_0

    .line 3
    iget-object v1, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Les/cm;

    monitor-exit v0

    return-object p1

    :cond_0
    const/4 p1, 0x0

    .line 4
    monitor-exit v0

    return-object p1

    :catchall_0
    move-exception p1

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public b(Les/cm;)Z
    .locals 6

    .line 6
    move-object v0, p1

    check-cast v0, Les/am;

    .line 7
    new-instance v1, Ljava/util/ArrayList;

    const/4 v2, 0x1

    invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V

    .line 8
    invoke-virtual {v0}, Les/am;->k()Lcom/estrongs/fs/g;

    move-result-object v3

    if-nez v3, :cond_0

    .line 9
    iget-object v3, p0, Les/bm;->b:Lcom/estrongs/fs/f;

    invoke-virtual {v0}, Les/am;->i()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 10
    :cond_0
    invoke-virtual {v0}, Les/am;->k()Lcom/estrongs/fs/g;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 11
    :goto_0
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->K0()Z

    move-result v0

    .line 12
    invoke-interface {p1}, Les/cm;->i()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    if-eqz v0, :cond_2

    .line 13
    invoke-static {v3}, Lcom/estrongs/android/pop/utils/s;->b(Ljava/lang/String;)I

    move-result v0

    sget v3, Lcom/estrongs/android/pop/utils/s;->c:I

    if-ne v0, v3, :cond_1

    const/4 v0, 0x1

    goto :goto_1

    :cond_1
    const/4 v0, 0x0

    .line 14
    :cond_2
    :goto_1
    new-instance v3, Les/c70;

    iget-object v5, p0, Les/bm;->b:Lcom/estrongs/fs/f;

    invoke-direct {v3, v5, v1, v4, v0}, Les/c70;-><init>(Lcom/estrongs/fs/f;Ljava/util/List;ZZ)V

    .line 15
    iget-object v0, p0, Les/bm;->c:Lcom/estrongs/android/pop/e;

    if-eqz v0, :cond_3

    .line 16
    invoke-virtual {v3, v0}, Les/s80;->a(Les/v80;)V

    .line 17
    :cond_3
    invoke-virtual {v3, v4}, Les/s80;->b(Z)V

    .line 18
    invoke-virtual {v3}, Les/s80;->m()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_4

    .line 19
    iget-object v0, p0, Les/bm;->a:Ljava/util/List;

    monitor-enter v0

    .line 20
    :try_start_0
    iget-object v1, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 21
    monitor-exit v0

    return v2

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    :cond_4
    return v4
.end method

.method public close()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    return-void
.end method

.method public getCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Les/bm;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public isEmpty()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method
